package unit15.textFile;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Employee {
	private String username;
	private int salary;
	private Date date;
	@Override
	public String toString() {
		return "Employee [username=" + username + ", salary=" + salary + ", date=" + date + "]";
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public int getSalary() {
		return salary;
	}
	public void setSalary(int salary) {
		this.salary = salary;
	}
	public Employee(String username, int salary,int year,int month,int day) throws ParseException {
		this.username = username;
		this.salary= salary;
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		Date date=sdf.parse(year+"-"+month+"-"+day);
		this.date=date;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	
}
